
                    <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
                        <path stroke-linecap="round" d="M5,0 0,2.5 5,5z" id="raphael-marker-block" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path>
                    </svg>
                    <blockquote> 
 <p><strong>高级的题库更新之后，专业性更强了，不是真正从事这一行的，很难做出来。本人就是个小菜鸡，有一些题，我也不想不明白。题目的答案我尽可能的找到出处，如果读者发现错误或有补充建议，欢迎评论或私信笔者。笔者这篇就当抛砖引玉，各位读者可以当作考试的一个参考</strong></p> 
</blockquote> 
<h4><a name="t0"></a><a id="HarmonyOShttpsblogcsdnnetGusha_articledetails140072321spm1001201430015502_5"></a>基础认证题库请移步：<a href="https://blog.csdn.net/Gusha_/article/details/140072321?spm=1001.2014.3001.5502" target="_blank">HarmonyOS应用开发者基础认证题库</a></h4> 
<hr> 
<h3><a name="t1"></a><a id="20_8"></a><code style="user-select: auto;">注：有读者反馈，题库的代码块比较多，打开文章时会卡死。所以笔者将题库拆分，以20道题为一组，题库目录如下，读者可以按需跳转。如果对您的阅读产生不便，笔者在这里向大家说声抱歉，请各位读者原谅。该题库已整理完毕，笔者不再更新。笔者连续考了三次，都过了，所以答案应该没什么太大问题。有需要题库文档的可以自取。祝各位读者好运(๑¯ω¯๑)。</code></h3> 
<h2><a name="t2"></a><a id="_10"></a>序号目录：</h2> 
<ul><li>单选题<br> <a href="https://blog.csdn.net/Gusha_/article/details/140295266?spm=1001.2014.3001.5502" target="_blank">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 单选题序号1</a><br> <a href="https://blog.csdn.net/Gusha_/article/details/140580616?spm=1001.2014.3001.5501" target="_blank">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 单选题序号2</a><br> <a href="https://blog.csdn.net/Gusha_/article/details/140580633?spm=1001.2014.3001.5501" target="_blank">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 单选题序号3</a><br> <a href="https://blog.csdn.net/Gusha_/article/details/140617294" target="_blank">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 单选题序号4</a><br> <a href="https://blog.csdn.net/Gusha_/article/details/140749409?spm=1001.2014.3001.5502" target="_blank">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 单选题序号5</a></li><li>多选题<br> <a href="https://blog.csdn.net/Gusha_/article/details/140580653?spm=1001.2014.3001.5501" target="_blank">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 多选题序号1</a><br> <a href="https://blog.csdn.net/Gusha_/article/details/140580668?spm=1001.2014.3001.5501" target="_blank">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 多选题序号2</a><br> <a href="https://blog.csdn.net/Gusha_/article/details/140613052?spm=1001.2014.3001.5502" target="_blank">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 多选题序号3</a></li><li>答案纯享版<br> <a href="https://blog.csdn.net/Gusha_/article/details/140676104?spm=1001.2014.3001.5502" target="_blank">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 答案纯享版</a></li></ul> 
<hr> 
<h4><a name="t3"></a><a id="httpspanbaiducoms153tDk4dVv_MmLEyzOqW9hQpwdxkgr_24"></a>题库文档链接（自取）：https://pan.baidu.com/s/153tDk4dVv_MmLEyzOqW9hQ?pwd=xkgr</h4> 
<hr> 
<h2><a name="t4"></a><a id="_29"></a>注：题目是乱序，每次考试，选项的顺序都不同</h2> 
<h3><a name="t5"></a><a id="_09_091_31"></a>多选题题库 - 序号1</h3> 
<hr> 
<p>1、在开发过程中，我们可以将每个功能模块作为一个独立的Module进行开发。关于Module，下列选项说法正确的是？</p> 
<p>​ <code style="user-select: auto;">A、feature类型的Module：应用的动态特性模块，编译后生成feature类型的HAP。一个应用中可以包含一个或多个feature类型的HAP，也可以不包含。</code></p> 
<p>​ <code style="user-select: auto;">B、Shared Library：动态共享库。HSP中的代码和资源可以独立编译，运行时在一个进程中代码也只会存在一份。</code></p> 
<p>​ <code style="user-select: auto;">C、Static Library：静态共享库。HAR中的代码和资源跟随使用方编译，如果有多个使用方，它们的编译产物中会存在多份相同拷贝。</code></p> 
<p>​ D、entry类型的Module：应用的主模块，包含应用的入口界面、入口图标和主功能特性，编译后生成entry类型的HAP。每一个应用分发到同一类型的设备上的应用程序包，可以包含一个或多个entry类型的HAP。</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/application-package-overview-V5#module%E7%B1%BB%E5%9E%8B" rel="nofollow" target="_blank">应用程序包概述-应用程序包基础知识-开发基础知识-基础入门 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>2、某业务团队发现用户对他们App的某个特性使用率并不高，为了节省用户首次下载安装包的体积，考虑将该特性做成按需加载，那么推荐该特性使用的工程模块类型是？</p> 
<p>​ <code style="user-select: auto;">A、hap</code></p> 
<p>​ B、app</p> 
<p>​ <code style="user-select: auto;">C、hsp</code></p> 
<p>​ D、har</p> 
<hr> 
<p>3、哪些是<span class="edu-hl hl hl-1" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\&quot;word\&quot;:\&quot;持续部署\&quot;}&quot;}" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\&quot;word\&quot;:\&quot;持续部署\&quot;}&quot;}" data-tit="持续部署" data-pretit="持续部署">持续部署</span>最佳实践？</p> 
<p>​ <code style="user-select: auto;">A、监控和回滚机制：实时监控部署后的应用状态，如有问题及时回滚。</code></p> 
<p>​ <code style="user-select: auto;">B、自动化部署流程：从代码提交到部署的整个流程应尽可能自动化。</code></p> 
<p>​ C、手工部署：持续部署可以采用手工部署的方式发布<span class="edu-hl hl hl-1" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\&quot;word\&quot;:\&quot;软件\&quot;}&quot;}" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\&quot;word\&quot;:\&quot;软件\&quot;}&quot;}" data-tit="软件" data-pretit="软件">软件</span>：</p> 
<p>​ 1、有一份非常详尽的文档，该文档描述了执行步骤及每个步骤中易出错的地方；</p> 
<p>​ 2、以手工测试来确认该应用程序是否运行正确；</p> 
<p>​ 3、在发布时，常常会修正一些在发布过程中发现的问题。</p> 
<p>​ <code style="user-select: auto;">D、灰度发布：先在小部分用户或区域进行部署，观察没问题后再全面推广。</code></p> 
<p>​ E、开发完成之后再向类生产环境部署：当软件被第一次部署到类生产环境（比如试运行环境）时，就是大部分开发工作完成时，至少是开发团队认为“该软件开发完成了”。</p> 
<p>​ F、手工配置管理：</p> 
<p>​ 1、直接修改生产环境上的配置来改变系统配置；</p> 
<p>​ 2、集群中各节点的行为有所不同；</p> 
<p>​ 3、靠人手工恢复环境。手动记载配置包括操作系统、应用服务器、关系型数据库管理系统、Web服务器或其他基础设施设置。</p> 
<p>​ <code style="user-select: auto;">G、环境一致性：保持开发、测试、生产等环境的高度一致性。</code></p> 
<hr> 
<p>4、以下代码片段哪几处违反了ArkTS语法规范。</p> 
<pre data-index="0" class="set-code-show prettyprint" style="user-select: auto;"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset; user-select: auto;"><span class="token keyword">class</span> <span class="token class-name">Point</span> <span class="token punctuation">{<!-- --></span>
  <span class="token keyword">public</span> x<span class="token operator">:</span> <span class="token builtin">number</span>
  <span class="token keyword">public</span> y<span class="token operator">:</span> <span class="token builtin">number</span>
  <span class="token function">constructor</span><span class="token punctuation">(</span>x<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">,</span> y<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token keyword">this</span><span class="token punctuation">.</span>x <span class="token operator">=</span> x
    <span class="token keyword">this</span><span class="token punctuation">.</span>y <span class="token operator">=</span> y
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>

<span class="token keyword">let</span> p <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Point</span><span class="token punctuation">(</span><span class="token number">1.0</span><span class="token punctuation">,</span> <span class="token number">1.0</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">delete</span> p<span class="token punctuation">.</span>x<span class="token punctuation">;</span>
p<span class="token punctuation">.</span>z <span class="token operator">=</span> <span class="token number">2.0</span><span class="token punctuation">;</span>
p<span class="token punctuation">.</span>x <span class="token operator">=</span> <span class="token string">'Hello!'</span><span class="token punctuation">;</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.953587;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:0,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ A、let p = new Point(1.0, 1.0);</p> 
<p>​ <code style="user-select: auto;">B、delete p.x;</code></p> 
<p>​ <code style="user-select: auto;">C、p.z = 2.0;</code></p> 
<p>​ <code style="user-select: auto;">D、p.x = 'Hello!';</code></p> 
<hr> 
<p><strong>5、以下napi代码有问题的是（不确定，把所有选项列出）</strong></p> 
<pre data-index="1" class="set-code-show prettyprint" style="user-select: auto;"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset; user-select: auto;"><span class="token comment">//	A</span>
<span class="token keyword">static</span> napi_value <span class="token function">Demo</span><span class="token punctuation">(</span>napi_env env<span class="token punctuation">,</span> napi_callback_info info<span class="token punctuation">)</span>
<span class="token punctuation">{<!-- --></span>
    constexpr size_t arrSize <span class="token operator">=</span> <span class="token number">1000</span><span class="token punctuation">;</span>
    napi_value arrBuffer <span class="token operator">=</span> nullptr<span class="token punctuation">;</span>
    <span class="token keyword">void</span> <span class="token operator">*</span>data <span class="token operator">=</span> nullptr<span class="token punctuation">;</span>
    <span class="token function">napi_create_arraybuffer</span><span class="token punctuation">(</span>env<span class="token punctuation">,</span> arrSize <span class="token operator">*</span> <span class="token function">sizeof</span><span class="token punctuation">(</span>int32_t<span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token operator">&amp;</span>data<span class="token punctuation">,</span> <span class="token operator">&amp;</span>arrBuffer<span class="token punctuation">)</span><span class="token punctuation">;</span>
    int32_t <span class="token operator">*</span>i32Buffer <span class="token operator">=</span> <span class="token generic-function"><span class="token function">reinterpret_cast</span><span class="token generic class-name"><span class="token operator">&lt;</span>int32_t <span class="token operator">*</span><span class="token operator">&gt;</span></span></span><span class="token punctuation">(</span>data<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">for</span> <span class="token punctuation">(</span>int i <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span> i <span class="token operator">&lt;</span> arrSize<span class="token punctuation">;</span> i<span class="token operator">++</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        i32Buffer<span class="token punctuation">[</span>i<span class="token punctuation">]</span> <span class="token operator">=</span> i<span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
    <span class="token keyword">return</span> arrBuffer<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.953587;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:1,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="2" class="prettyprint set-code-show" style="user-select: auto;"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset; user-select: auto;"><span class="token comment">//	B</span>
napi_ref g_ref <span class="token operator">=</span> nullptr<span class="token punctuation">;</span>
<span class="token comment">/***** excute in main thread *****/</span>
<span class="token keyword">static</span> napi_value <span class="token function">DemoInMainThread</span><span class="token punctuation">(</span>napi_env env<span class="token punctuation">,</span> napi_callback_info info<span class="token punctuation">)</span>
<span class="token punctuation">{<!-- --></span>
    napi_value <span class="token builtin">string</span> <span class="token operator">=</span> nullptr<span class="token punctuation">;</span>
    <span class="token function">napi_create_string_utf8</span><span class="token punctuation">(</span>env<span class="token punctuation">,</span> <span class="token string">"bar"</span><span class="token punctuation">,</span> <span class="token constant">NAPI_AUTO_LENGTH</span><span class="token punctuation">,</span> <span class="token operator">&amp;</span><span class="token builtin">string</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token function">napi_create_reference</span><span class="token punctuation">(</span>env<span class="token punctuation">,</span> <span class="token builtin">string</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token operator">&amp;</span>g_ref<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">return</span> <span class="token builtin">string</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token comment">/***** excute in worker thread *****/</span>
<span class="token keyword">static</span> napi_value <span class="token function">DemoInWorkerThread</span><span class="token punctuation">(</span>napi_env env<span class="token punctuation">,</span> napi_callback_info info<span class="token punctuation">)</span>
<span class="token punctuation">{<!-- --></span>
    napi_value <span class="token builtin">string</span> <span class="token operator">=</span> nullptr<span class="token punctuation">;</span>
    <span class="token function">napi_get_reference_value</span><span class="token punctuation">(</span>env<span class="token punctuation">,</span> g_ref<span class="token punctuation">,</span> <span class="token operator">&amp;</span><span class="token builtin">string</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    
    napi_value object <span class="token operator">=</span> nullptr<span class="token punctuation">;</span>
    <span class="token function">napi_create_object</span><span class="token punctuation">(</span>env<span class="token punctuation">,</span> <span class="token operator">&amp;</span>object<span class="token punctuation">)</span><span class="token punctuation">;</span>
    
    <span class="token function">napi_set_named_property</span><span class="token punctuation">(</span>env<span class="token punctuation">,</span> object<span class="token punctuation">,</span> <span class="token string">"foo"</span><span class="token punctuation">,</span> <span class="token builtin">string</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">return</span> object<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.953587;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:2,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="3" class="prettyprint set-code-show" style="user-select: auto;"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset; user-select: auto;"><span class="token comment">//	C</span>
struct CallbackContext <span class="token punctuation">{<!-- --></span>
    napi_env env <span class="token operator">=</span> nullptr<span class="token punctuation">;</span>
    napi_ref callbackRef <span class="token operator">=</span> nullptr<span class="token punctuation">;</span>
    int32_t retData <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>

<span class="token keyword">void</span> <span class="token function">callbackTest</span><span class="token punctuation">(</span>CallbackContext <span class="token operator">*</span>context<span class="token punctuation">)</span>
<span class="token punctuation">{<!-- --></span>
    uv_loop_s <span class="token operator">*</span>loop <span class="token operator">=</span> nullptr<span class="token punctuation">;</span>
    <span class="token function">napi_get_uv_event_loop</span><span class="token punctuation">(</span>context<span class="token operator">-</span><span class="token operator">&gt;</span>env<span class="token punctuation">,</span> <span class="token operator">&amp;</span>loop<span class="token punctuation">)</span><span class="token punctuation">;</span>
    uv_work_t <span class="token operator">*</span>work <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">uv_work_t</span><span class="token punctuation">;</span>
    context<span class="token operator">-</span><span class="token operator">&gt;</span>retData <span class="token operator">=</span> <span class="token number">1</span><span class="token punctuation">;</span>
    work<span class="token operator">-</span><span class="token operator">&gt;</span>data <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token keyword">void</span> <span class="token operator">*</span><span class="token punctuation">)</span>context<span class="token punctuation">;</span>
    <span class="token function">uv_queue_work</span><span class="token punctuation">(</span>
        loop<span class="token punctuation">,</span> work<span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">(</span>uv_work_t <span class="token operator">*</span>work<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span><span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token comment">// using callback function back to JS thread</span>
        <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">(</span>uv_work_t <span class="token operator">*</span>work<span class="token punctuation">,</span> int status<span class="token punctuation">)</span>
        <span class="token punctuation">{<!-- --></span>
            CallbackContext <span class="token operator">*</span>context <span class="token operator">=</span> <span class="token punctuation">(</span>CallbackContext <span class="token operator">*</span><span class="token punctuation">)</span>work<span class="token operator">-</span><span class="token operator">&gt;</span>data<span class="token punctuation">;</span>

            napi_value callback <span class="token operator">=</span> nullptr<span class="token punctuation">;</span>
            <span class="token function">napi_get_reference_value</span><span class="token punctuation">(</span>context<span class="token operator">-</span><span class="token operator">&gt;</span>env<span class="token punctuation">,</span> context<span class="token operator">-</span><span class="token operator">&gt;</span>callbackRef<span class="token punctuation">,</span> <span class="token operator">&amp;</span>callback<span class="token punctuation">)</span><span class="token punctuation">;</span>
            napi_value retArg<span class="token punctuation">;</span>
            <span class="token function">napi_create_int32</span><span class="token punctuation">(</span>context<span class="token operator">-</span><span class="token operator">&gt;</span>env<span class="token punctuation">,</span> context<span class="token operator">-</span><span class="token operator">&gt;</span>retData<span class="token punctuation">,</span> <span class="token operator">&amp;</span>retArg<span class="token punctuation">)</span><span class="token punctuation">;</span>
            napi_value ret<span class="token punctuation">;</span>
            <span class="token function">napi_call_function</span><span class="token punctuation">(</span>context<span class="token operator">-</span><span class="token operator">&gt;</span>env<span class="token punctuation">,</span> nullptr<span class="token punctuation">,</span> callback<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token operator">&amp;</span>retArg<span class="token punctuation">,</span> <span class="token operator">&amp;</span>ret<span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token function">napi_delete_reference</span><span class="token punctuation">(</span>context<span class="token operator">-</span><span class="token operator">&gt;</span>env<span class="token punctuation">,</span> context<span class="token operator">-</span><span class="token operator">&gt;</span>callbackRef<span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token keyword">if</span> <span class="token punctuation">(</span>work <span class="token operator">!=</span> nullptr<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
                <span class="token keyword">delete</span> work<span class="token punctuation">;</span>
            <span class="token punctuation">}</span>
            <span class="token keyword">delete</span> context<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.953587;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:3,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="4" class="prettyprint set-code-show" style="user-select: auto;"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset; user-select: auto;"><span class="token comment">//	D</span>
<span class="token keyword">static</span> napi_value <span class="token function">Demo</span><span class="token punctuation">(</span>napi_env env<span class="token punctuation">,</span> napi_callback_info info<span class="token punctuation">)</span>
<span class="token punctuation">{<!-- --></span>
    size_t argc <span class="token operator">=</span> <span class="token number">1</span><span class="token punctuation">;</span>
    napi_value args<span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token punctuation">{<!-- --></span>nullptr<span class="token punctuation">}</span><span class="token punctuation">;</span>

    <span class="token function">napi_get_cb_info</span><span class="token punctuation">(</span>env<span class="token punctuation">,</span> info<span class="token punctuation">,</span> <span class="token operator">&amp;</span>argc<span class="token punctuation">,</span> args<span class="token punctuation">,</span> nullptr<span class="token punctuation">,</span> nullptr<span class="token punctuation">)</span><span class="token punctuation">;</span>
    napi_value sizeObj <span class="token operator">=</span> nullptr<span class="token punctuation">;</span>
    
    napi_handle_scope scope <span class="token operator">=</span> nullptr<span class="token punctuation">;</span>
    <span class="token function">napi_open_handle_scope</span><span class="token punctuation">(</span>env<span class="token punctuation">,</span> <span class="token operator">&amp;</span>scope<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token function">napi_call_function</span><span class="token punctuation">(</span>env<span class="token punctuation">,</span> nullptr<span class="token punctuation">,</span> args<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> nullptr<span class="token punctuation">,</span> <span class="token operator">&amp;</span>sizeObj<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token function">napi_close_handle_scope</span><span class="token punctuation">(</span>env<span class="token punctuation">,</span> scope<span class="token punctuation">)</span><span class="token punctuation">;</span>
    
    int64_t width <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span>
    napi_value result <span class="token operator">=</span> nullptr<span class="token punctuation">;</span>
    <span class="token function">napi_get_element</span><span class="token punctuation">(</span>env<span class="token punctuation">,</span> sizeObj<span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token operator">&amp;</span>result<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token function">napi_get_value_int64</span><span class="token punctuation">(</span>env<span class="token punctuation">,</span> result<span class="token punctuation">,</span> <span class="token operator">&amp;</span>width<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">return</span> result<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.953587;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:4,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ <strong>A、A</strong></p> 
<p>​ <code style="user-select: auto;">B、B</code></p> 
<p>​ <strong>C、C</strong></p> 
<p>​ <code style="user-select: auto;">D、D</code></p> 
<hr> 
<p>6、下面关于混淆的描述正确的是</p> 
<p>​ <code style="user-select: auto;">A、代码混淆已经被集成了到SDK中，可以在DevEco Studio中方便地使用。</code></p> 
<p>​ <code style="user-select: auto;">B、针对工程源码的混淆可以降低工程被破解攻击的风险，缩短函数名、类名和属性名，减小应用的大小。</code></p> 
<p>​ <code style="user-select: auto;">C、API10及以上版本的Stage模型、编译模式为release时，默认开启代码混淆功能；默认的混淆功能仅会混淆函数参数和局部变量的名称。</code></p> 
<p>​ <code style="user-select: auto;">D、混淆支持ArkTS/TS/JS文件的混淆</code></p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5" rel="nofollow" target="_blank">代码混淆-ArkTS（方舟编程语言）-应用框架 | 华为开发者联盟 (huawei.com)</a></p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/ide-build-obfuscation-0000001731754312-V5" rel="nofollow" target="_blank">代码混淆-加固构建-编译构建-DevEco Studio | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p><strong>7、下面关于方舟字节码指令含义说明正确的是（不确定，把所有选项列出）</strong></p> 
<p>​ <code style="user-select: auto;">A、假设寄存器v0存放了对象A，累加器(acc)存放了对象B，那么执行指令"Ida v0"后，v0存放对象A，acc存放对象A</code></p> 
<p>​ <strong>B、 假设寄存器v0存放了对象A，累加器(acc)存放了对象B，那么执行指令"Ida v0"后，v0存放对象B，acc存放对象B</strong></p> 
<p>​ <strong>C、假设寄存器v0存放了对象A，寄存器v1存放了对象B，那么执行指令"mov v0,v1"后，v0存放对象A，v1存放对象A</strong></p> 
<p>​ <code style="user-select: auto;">D、假设寄存器v0存放了对象A，寄存器v1存放了对象B，那么执行指令"mov v0,v1"后，v0存放对象B，v1存放对象B</code></p> 
<hr> 
<p>8、下面关于ArkTS中import用法，正确的是</p> 
<p>​ <code style="user-select: auto;">A、import { export1 as alias1 } from "ets file name";</code></p> 
<p>​ <code style="user-select: auto;">B、import defaultExport from "ets file name"</code></p> 
<p>​ <code style="user-select: auto;">C、import * as name from "ets file name"</code></p> 
<p>​ <code style="user-select: auto;">D、import { export1 } from "ets file name";</code></p> 
<hr> 
<p><strong>9、以下关于ArkTS线程实例间传输实现方式描述正确的是（不确定，把所有选项列出）</strong></p> 
<pre data-index="5" class="prettyprint set-code-show" style="user-select: auto;"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset; user-select: auto;"><span class="token keyword">import</span> <span class="token punctuation">{<!-- --></span> taskpool<span class="token punctuation">,</span> worker <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'@kit.ArkTS'</span><span class="token punctuation">;</span>

<span class="token decorator"><span class="token at operator">@</span><span class="token function">Sendable</span></span>
<span class="token keyword">class</span> <span class="token class-name"><span class="token constant">A</span></span> <span class="token punctuation">{<!-- --></span><span class="token punctuation">}</span>

<span class="token keyword">let</span> a<span class="token operator">:</span> <span class="token constant">A</span> <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name"><span class="token constant">A</span></span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token decorator"><span class="token at operator">@</span><span class="token function">Concurrent</span></span>
<span class="token keyword">function</span> <span class="token function">foo</span><span class="token punctuation">(</span>a<span class="token operator">:</span> <span class="token constant">A</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span><span class="token punctuation">}</span>

<span class="token keyword">let</span> task<span class="token operator">:</span> taskpool<span class="token punctuation">.</span>Task <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">taskpool</span><span class="token punctuation">.</span><span class="token function">Task</span><span class="token punctuation">(</span>foo<span class="token punctuation">,</span> a<span class="token punctuation">)</span>

<span class="token keyword">let</span> w <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">worker</span><span class="token punctuation">.</span><span class="token function">ThreadWorker</span><span class="token punctuation">(</span><span class="token string">"entry/ets/workers/Worker.ets"</span><span class="token punctuation">)</span>

taskpool<span class="token punctuation">.</span><span class="token function">execute</span><span class="token punctuation">(</span>task<span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span><span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

w<span class="token punctuation">.</span><span class="token function">postMessageWithSharedSendable</span><span class="token punctuation">(</span>a<span class="token punctuation">)</span><span class="token punctuation">;</span>

task<span class="token punctuation">.</span><span class="token function">setCloneList</span><span class="token punctuation">(</span><span class="token punctuation">[</span>a<span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
taskpool<span class="token punctuation">.</span><span class="token function">execute</span><span class="token punctuation">(</span>task<span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span><span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

w<span class="token punctuation">.</span><span class="token function">postMessage</span><span class="token punctuation">(</span>a<span class="token punctuation">)</span><span class="token punctuation">;</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.953587;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:5,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ <code style="user-select: auto;">A、task.setCloneList([a]); taskpool.execute(task).then() =&gt; {});，TaskPool 共享传输实现方式</code></p> 
<p>​ <code style="user-select: auto;">B、taskpool.execute(task).then(() =&gt; {});，TaskPool 共享传输实现方式</code></p> 
<p>​ <code style="user-select: auto;">C、w.postMessage(a);，Worker 共享传输实现方式</code></p> 
<p>​ <code style="user-select: auto;">D、w.postMessageWithSharedSendable(a);，Worker 共享传输实现方式</code></p> 
<hr> 
<p>10、以下代码片段哪几个<span class="edu-hl hl hl-1" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\&quot;word\&quot;:\&quot;函数\&quot;}&quot;}" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\&quot;word\&quot;:\&quot;函数\&quot;}&quot;}" data-tit="函数" data-pretit="函数">函数</span>违反了ArkTS语法规范。</p> 
<pre data-index="6" class="prettyprint set-code-show" style="user-select: auto;"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset; user-select: auto;"><span class="token keyword">function</span> <span class="token function">foo1</span><span class="token punctuation">(</span>value1<span class="token operator">?</span><span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">,</span> value2<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    
	<span class="token keyword">if</span><span class="token punctuation">(</span>value1 <span class="token operator">==</span> <span class="token keyword">undefined</span><span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>
        
		<span class="token keyword">return</span> value2<span class="token punctuation">;</span>
        
	<span class="token punctuation">}</span>
    
		<span class="token keyword">return</span> value1 <span class="token operator">+</span> value2<span class="token punctuation">;</span>
    
<span class="token punctuation">}</span>

<span class="token keyword">function</span> <span class="token function">foo2</span><span class="token punctuation">(</span>value1<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">,</span> value2<span class="token operator">?</span><span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    
	<span class="token keyword">if</span> <span class="token punctuation">(</span>value2 <span class="token operator">==</span> <span class="token keyword">undefined</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        
		<span class="token keyword">return</span> value1<span class="token punctuation">;</span>
        
	<span class="token punctuation">}</span>
    
	<span class="token keyword">return</span> value1 <span class="token operator">+</span> value2<span class="token punctuation">;</span>
    
<span class="token punctuation">}</span>

<span class="token keyword">function</span> <span class="token function">foo3</span><span class="token punctuation">(</span>value<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">,</span> <span class="token operator">...</span>arrary<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    
	<span class="token keyword">return</span> value<span class="token punctuation">;</span>
    
<span class="token punctuation">}</span>

<span class="token keyword">function</span> <span class="token function">foo4</span><span class="token punctuation">(</span> <span class="token operator">...</span>arrary<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span> value<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    
	<span class="token keyword">return</span> value<span class="token punctuation">;</span>
    
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.953587;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:6,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ <code style="user-select: auto;">A、foo1</code></p> 
<p>​ B、foo2</p> 
<p>​ C、foo3</p> 
<p>​ <code style="user-select: auto;">D、foo4</code></p> 
<hr> 
<p>11、在ArkTS中，以下哪些属性的声明是正确的。</p> 
<pre data-index="7" class="set-code-show prettyprint" style="user-select: auto;"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset; user-select: auto;"><span class="token keyword">class</span> <span class="token class-name"><span class="token constant">C</span></span> <span class="token punctuation">{<!-- --></span>

  value1<span class="token operator">:</span> <span class="token builtin">number</span> <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span>

  value2<span class="token operator">?</span><span class="token operator">:</span> <span class="token builtin">number</span> <span class="token operator">=</span> <span class="token keyword">null</span><span class="token punctuation">;</span>

  value3<span class="token operator">:</span> <span class="token builtin">number</span> <span class="token operator">|</span> <span class="token keyword">undefined</span> <span class="token operator">=</span> <span class="token keyword">undefined</span><span class="token punctuation">;</span>

  value4<span class="token operator">?</span><span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">;</span>
  
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.953587;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:7,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ <code style="user-select: auto;">A、value1</code></p> 
<p>​ B、value2</p> 
<p>​ <code style="user-select: auto;">C、value3</code></p> 
<p>​ <code style="user-select: auto;">D、value4</code></p> 
<hr> 
<p><strong>12、如下ABC 3处手势，有机会执行的是哪几处?（不确定，把所有选项列出）</strong></p> 
<pre data-index="8" class="prettyprint set-code-show" style="user-select: auto;"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset; user-select: auto;"><span class="token decorator"><span class="token at operator">@</span><span class="token function">Entry</span></span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Component</span></span>
struct ListTest <span class="token punctuation">{<!-- --></span>
  scroller<span class="token operator">:</span> Scroller <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Scroller</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
  scroller2<span class="token operator">:</span> Scroller <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Scroller</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
  scroller3<span class="token operator">:</span> Scroller <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Scroller</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
  <span class="token keyword">private</span> arr<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">4</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">6</span><span class="token punctuation">,</span> <span class="token number">7</span><span class="token punctuation">,</span> <span class="token number">8</span><span class="token punctuation">,</span> <span class="token number">9</span><span class="token punctuation">]</span>
  <span class="token keyword">private</span> childRecognizer<span class="token operator">:</span> GestureRecognizer <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">GestureRecognizer</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
  <span class="token keyword">private</span> currentRecognizer<span class="token operator">:</span> GestureRecognizer <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">GestureRecognizer</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
  <span class="token keyword">private</span> lastOffset<span class="token operator">:</span> <span class="token builtin">number</span> <span class="token operator">=</span> <span class="token number">0</span>

  <span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token function">Stack</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> alignContent<span class="token operator">:</span> Alignment<span class="token punctuation">.</span>TopStart <span class="token punctuation">}</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
      <span class="token function">Scroll</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>scroller<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token function">Column</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
          <span class="token function">Text</span><span class="token punctuation">(</span><span class="token string">"Scroll Area"</span><span class="token punctuation">)</span>
            <span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'90%'</span><span class="token punctuation">)</span>
            <span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token number">150</span><span class="token punctuation">)</span>
            <span class="token punctuation">.</span><span class="token function">backgroundColor</span><span class="token punctuation">(</span><span class="token number">0xFFFFFF</span><span class="token punctuation">)</span>
            <span class="token punctuation">.</span><span class="token function">borderRadius</span><span class="token punctuation">(</span><span class="token number">15</span><span class="token punctuation">)</span>
            <span class="token punctuation">.</span><span class="token function">fontSize</span><span class="token punctuation">(</span><span class="token number">16</span><span class="token punctuation">)</span>
            <span class="token punctuation">.</span><span class="token function">textAlign</span><span class="token punctuation">(</span>TextAlign<span class="token punctuation">.</span>Center<span class="token punctuation">)</span>
            <span class="token punctuation">.</span><span class="token function">margin</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> top<span class="token operator">:</span> <span class="token number">10</span> <span class="token punctuation">}</span><span class="token punctuation">)</span>
          <span class="token function">List</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> space<span class="token operator">:</span> <span class="token number">20</span><span class="token punctuation">,</span> initialIndex<span class="token operator">:</span> <span class="token number">0</span> <span class="token punctuation">}</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
            <span class="token function">ForEach</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>arr<span class="token punctuation">,</span> <span class="token punctuation">(</span>item<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
              <span class="token function">ListItem</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
                <span class="token function">Text</span><span class="token punctuation">(</span><span class="token string">''</span> <span class="token operator">+</span> item<span class="token punctuation">)</span>
                  <span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span>
                  <span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token number">100</span><span class="token punctuation">)</span>
                  <span class="token punctuation">.</span><span class="token function">fontSize</span><span class="token punctuation">(</span><span class="token number">16</span><span class="token punctuation">)</span>
                  <span class="token punctuation">.</span><span class="token function">backgroundColor</span><span class="token punctuation">(</span>Color<span class="token punctuation">.</span>Blue<span class="token punctuation">)</span>
                  <span class="token punctuation">.</span><span class="token function">textAlign</span><span class="token punctuation">(</span>TextAlign<span class="token punctuation">.</span>Center<span class="token punctuation">)</span>
                  <span class="token punctuation">.</span><span class="token function">borderRadius</span><span class="token punctuation">(</span><span class="token number">10</span><span class="token punctuation">)</span>
              <span class="token punctuation">}</span>
            <span class="token punctuation">}</span><span class="token punctuation">,</span>
              <span class="token punctuation">(</span>item<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> item
            <span class="token punctuation">)</span>
          <span class="token punctuation">}</span>
          <span class="token punctuation">.</span><span class="token function">listDirection</span><span class="token punctuation">(</span>Axis<span class="token punctuation">.</span>Vertical<span class="token punctuation">)</span> <span class="token comment">// 排列方向</span>
          <span class="token punctuation">.</span><span class="token function">scrollBar</span><span class="token punctuation">(</span>BarState<span class="token punctuation">.</span>Off<span class="token punctuation">)</span>
          <span class="token punctuation">.</span><span class="token function">friction</span><span class="token punctuation">(</span><span class="token number">0.6</span><span class="token punctuation">)</span>
          <span class="token punctuation">.</span><span class="token function">divider</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span>
            strokeWidth<span class="token operator">:</span> <span class="token number">2</span><span class="token punctuation">,</span>
            color<span class="token operator">:</span> <span class="token number">0xFFFFF</span><span class="token punctuation">,</span>
            startMargin<span class="token operator">:</span> <span class="token number">20</span><span class="token punctuation">,</span>
            endMargin<span class="token operator">:</span> <span class="token number">20</span>
          <span class="token punctuation">}</span><span class="token punctuation">)</span> <span class="token comment">//每行之间的分界线</span>
          <span class="token punctuation">.</span><span class="token function">edgeEffect</span><span class="token punctuation">(</span>EdgeEffect<span class="token punctuation">.</span>None<span class="token punctuation">)</span> <span class="token comment">// 边缘效果设置为Spring</span>
          <span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token number">1000</span><span class="token punctuation">)</span>
          <span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'90%'</span><span class="token punctuation">)</span>
          <span class="token punctuation">.</span><span class="token function">id</span><span class="token punctuation">(</span><span class="token string">"inner"</span><span class="token punctuation">)</span>
        <span class="token punctuation">}</span><span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span>
      <span class="token punctuation">}</span>
      <span class="token punctuation">.</span><span class="token function">id</span><span class="token punctuation">(</span><span class="token string">"outer"</span><span class="token punctuation">)</span>
      <span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token number">600</span><span class="token punctuation">)</span>
      <span class="token punctuation">.</span><span class="token function">scrollable</span><span class="token punctuation">(</span>ScrollDirection<span class="token punctuation">.</span>Vertical<span class="token punctuation">)</span> <span class="token comment">// 滚动方向纵向</span>
      <span class="token punctuation">.</span><span class="token function">scrollBar</span><span class="token punctuation">(</span>BarState<span class="token punctuation">.</span>On<span class="token punctuation">)</span> <span class="token comment">// 滚动条常驻显示</span>
      <span class="token punctuation">.</span><span class="token function">scrollBarColor</span><span class="token punctuation">(</span>Color<span class="token punctuation">.</span>Gray<span class="token punctuation">)</span> <span class="token comment">// 滚动条颜色</span>
      <span class="token punctuation">.</span><span class="token function">scrollBarWidth</span><span class="token punctuation">(</span><span class="token number">10</span><span class="token punctuation">)</span> <span class="token comment">// 滚动条宽度</span>
      <span class="token punctuation">.</span><span class="token function">edgeEffect</span><span class="token punctuation">(</span>EdgeEffect<span class="token punctuation">.</span>None<span class="token punctuation">)</span>
      <span class="token punctuation">.</span><span class="token function">onScroll</span><span class="token punctuation">(</span><span class="token punctuation">(</span>xOffset<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">,</span> yOffset<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
        <span class="token builtin">console</span><span class="token punctuation">.</span><span class="token function">info</span><span class="token punctuation">(</span>xOffset <span class="token operator">+</span> <span class="token string">' '</span> <span class="token operator">+</span> yOffset<span class="token punctuation">)</span>
      <span class="token punctuation">}</span><span class="token punctuation">)</span>
      <span class="token punctuation">.</span><span class="token function">onScrollEdge</span><span class="token punctuation">(</span><span class="token punctuation">(</span>side<span class="token operator">:</span> Edge<span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
        <span class="token builtin">console</span><span class="token punctuation">.</span><span class="token function">info</span><span class="token punctuation">(</span><span class="token string">'To the edge'</span><span class="token punctuation">)</span>
      <span class="token punctuation">}</span><span class="token punctuation">)</span>
      <span class="token punctuation">.</span><span class="token function">onScrollStop</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
        <span class="token builtin">console</span><span class="token punctuation">.</span><span class="token function">info</span><span class="token punctuation">(</span><span class="token string">'Scroll Stop'</span><span class="token punctuation">)</span>
      <span class="token punctuation">}</span><span class="token punctuation">)</span>

      <span class="token comment">//  A</span>
      <span class="token comment">/*.gesture(
        TapGesture({ count: 2 })
          .onAction((event: GestureEvent) =&gt; {
            if (event) {
              this.value = JSON.stringify(event.fingerList[0])
            }
          })
      )*/</span>

      <span class="token comment">//  B</span>
      <span class="token comment">/*.gesture(
        PanGesture({PanDirection.Vertical})
          .onActionUpdate((event: GestureEvent)=&gt;{
            console.log("zcb onActionUpdate event offsetY " + event.offsetY + "this.lastOffset " + this.lastOffset)
          })
      )*/</span>

      <span class="token comment">//  C</span>
      <span class="token comment">/*.parallelGesture(
        PanGesture({PanDirection.Vertical})
          .onActionUpdate((event: GestureEvent)=&gt;{
            console.log("zcb onActionUpdate event offsetY " + event.offsetY + "this.lastOffset " + this.lastOffset)
          })
      )*/</span>

    <span class="token punctuation">}</span><span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">backgroundColor</span><span class="token punctuation">(</span><span class="token number">0xDCDCDC</span><span class="token punctuation">)</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.953587;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li><li style="color: rgb(153, 153, 153);">40</li><li style="color: rgb(153, 153, 153);">41</li><li style="color: rgb(153, 153, 153);">42</li><li style="color: rgb(153, 153, 153);">43</li><li style="color: rgb(153, 153, 153);">44</li><li style="color: rgb(153, 153, 153);">45</li><li style="color: rgb(153, 153, 153);">46</li><li style="color: rgb(153, 153, 153);">47</li><li style="color: rgb(153, 153, 153);">48</li><li style="color: rgb(153, 153, 153);">49</li><li style="color: rgb(153, 153, 153);">50</li><li style="color: rgb(153, 153, 153);">51</li><li style="color: rgb(153, 153, 153);">52</li><li style="color: rgb(153, 153, 153);">53</li><li style="color: rgb(153, 153, 153);">54</li><li style="color: rgb(153, 153, 153);">55</li><li style="color: rgb(153, 153, 153);">56</li><li style="color: rgb(153, 153, 153);">57</li><li style="color: rgb(153, 153, 153);">58</li><li style="color: rgb(153, 153, 153);">59</li><li style="color: rgb(153, 153, 153);">60</li><li style="color: rgb(153, 153, 153);">61</li><li style="color: rgb(153, 153, 153);">62</li><li style="color: rgb(153, 153, 153);">63</li><li style="color: rgb(153, 153, 153);">64</li><li style="color: rgb(153, 153, 153);">65</li><li style="color: rgb(153, 153, 153);">66</li><li style="color: rgb(153, 153, 153);">67</li><li style="color: rgb(153, 153, 153);">68</li><li style="color: rgb(153, 153, 153);">69</li><li style="color: rgb(153, 153, 153);">70</li><li style="color: rgb(153, 153, 153);">71</li><li style="color: rgb(153, 153, 153);">72</li><li style="color: rgb(153, 153, 153);">73</li><li style="color: rgb(153, 153, 153);">74</li><li style="color: rgb(153, 153, 153);">75</li><li style="color: rgb(153, 153, 153);">76</li><li style="color: rgb(153, 153, 153);">77</li><li style="color: rgb(153, 153, 153);">78</li><li style="color: rgb(153, 153, 153);">79</li><li style="color: rgb(153, 153, 153);">80</li><li style="color: rgb(153, 153, 153);">81</li><li style="color: rgb(153, 153, 153);">82</li><li style="color: rgb(153, 153, 153);">83</li><li style="color: rgb(153, 153, 153);">84</li><li style="color: rgb(153, 153, 153);">85</li><li style="color: rgb(153, 153, 153);">86</li><li style="color: rgb(153, 153, 153);">87</li><li style="color: rgb(153, 153, 153);">88</li><li style="color: rgb(153, 153, 153);">89</li><li style="color: rgb(153, 153, 153);">90</li><li style="color: rgb(153, 153, 153);">91</li><li style="color: rgb(153, 153, 153);">92</li><li style="color: rgb(153, 153, 153);">93</li><li style="color: rgb(153, 153, 153);">94</li><li style="color: rgb(153, 153, 153);">95</li><li style="color: rgb(153, 153, 153);">96</li><li style="color: rgb(153, 153, 153);">97</li><li style="color: rgb(153, 153, 153);">98</li><li style="color: rgb(153, 153, 153);">99</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:8,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ <strong>A、NA</strong></p> 
<p>​ <code style="user-select: auto;">B、A</code></p> 
<p>​ <strong>C、B</strong></p> 
<p>​ <code style="user-select: auto;">D、C</code></p> 
<hr> 
<p>13、以下哪些实现方式可实现文本字号20的效果</p> 
<pre data-index="9" class="set-code-show prettyprint" style="user-select: auto;"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset; user-select: auto;"><span class="token comment">// A</span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Entry</span></span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Component</span></span>
struct Index <span class="token punctuation">{<!-- --></span>
  <span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token function">Flex</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> direction<span class="token operator">:</span> FlexDirection<span class="token punctuation">.</span>Column<span class="token punctuation">,</span> alignItems<span class="token operator">:</span> ItemAlign<span class="token punctuation">.</span>Start<span class="token punctuation">,</span> justifyContent<span class="token operator">:</span> FlexAlign<span class="token punctuation">.</span>SpaceBetween <span class="token punctuation">}</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
      <span class="token function">Text</span><span class="token punctuation">(</span><span class="token string">'This is the text with the height adaptive policy set'</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'80%'</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token number">90</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">minFontSize</span><span class="token punctuation">(</span><span class="token number">20</span><span class="token punctuation">)</span>
    <span class="token punctuation">}</span><span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token number">250</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">padding</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> left<span class="token operator">:</span> <span class="token number">35</span><span class="token punctuation">,</span> right<span class="token operator">:</span> <span class="token number">35</span><span class="token punctuation">,</span> top<span class="token operator">:</span> <span class="token number">35</span> <span class="token punctuation">}</span><span class="token punctuation">)</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.953587;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:9,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="10" class="set-code-show prettyprint" style="user-select: auto;"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset; user-select: auto;"><span class="token comment">// B</span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Entry</span></span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Component</span></span>
struct SpanExample <span class="token punctuation">{<!-- --></span>
  <span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token function">Flex</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> direction<span class="token operator">:</span> FlexDirection<span class="token punctuation">.</span>Column<span class="token punctuation">,</span> alignItems<span class="token operator">:</span> ItemAlign<span class="token punctuation">.</span>Start<span class="token punctuation">,</span> justifyContent<span class="token operator">:</span> FlexAlign<span class="token punctuation">.</span>SpaceBetween <span class="token punctuation">}</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
      <span class="token function">Text</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token function">Span</span><span class="token punctuation">(</span><span class="token string">'span letter spacing'</span><span class="token punctuation">)</span>
          <span class="token punctuation">.</span><span class="token function">letterSpacing</span><span class="token punctuation">(</span><span class="token number">3</span><span class="token punctuation">)</span>
          <span class="token punctuation">.</span><span class="token function">fontSize</span><span class="token punctuation">(</span><span class="token number">20</span><span class="token punctuation">)</span>
      <span class="token punctuation">}</span><span class="token punctuation">.</span><span class="token function">fontSize</span><span class="token punctuation">(</span><span class="token number">30</span><span class="token punctuation">)</span>
    <span class="token punctuation">}</span><span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token number">250</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">padding</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> left<span class="token operator">:</span> <span class="token number">35</span><span class="token punctuation">,</span> right<span class="token operator">:</span> <span class="token number">35</span><span class="token punctuation">,</span> top<span class="token operator">:</span> <span class="token number">35</span> <span class="token punctuation">}</span><span class="token punctuation">)</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.953587;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:10,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="11" class="prettyprint set-code-show" style="user-select: auto;"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset; user-select: auto;"><span class="token comment">// C</span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Entry</span></span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Component</span></span>
struct Index <span class="token punctuation">{<!-- --></span>
  <span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token function">Flex</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> direction<span class="token operator">:</span> FlexDirection<span class="token punctuation">.</span>Column<span class="token punctuation">,</span> alignItems<span class="token operator">:</span> ItemAlign<span class="token punctuation">.</span>Start<span class="token punctuation">,</span> justifyContent<span class="token operator">:</span> FlexAlign<span class="token punctuation">.</span>SpaceBetween <span class="token punctuation">}</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
      <span class="token comment">//文本水平方向对齐方式设置</span>
      <span class="token comment">//单行文本</span>
      <span class="token function">Text</span><span class="token punctuation">(</span><span class="token string">'TextAlign set to Center.'</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">textAlign</span><span class="token punctuation">(</span>TextAlign<span class="token punctuation">.</span>Center<span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">fontSize</span><span class="token punctuation">(</span><span class="token number">20</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">border</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> width<span class="token operator">:</span> <span class="token number">1</span> <span class="token punctuation">}</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">padding</span><span class="token punctuation">(</span><span class="token number">10</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span>
    <span class="token punctuation">}</span><span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token number">600</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token number">350</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">padding</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> left<span class="token operator">:</span> <span class="token number">35</span><span class="token punctuation">,</span> right<span class="token operator">:</span> <span class="token number">35</span><span class="token punctuation">,</span> top<span class="token operator">:</span> <span class="token number">35</span> <span class="token punctuation">}</span><span class="token punctuation">)</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.953587;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:11,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="12" class="prettyprint set-code-show" style="user-select: auto;"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset; user-select: auto;"><span class="token comment">// D</span>
<span class="token keyword">import</span> <span class="token punctuation">{<!-- --></span> LengthMetrics<span class="token punctuation">,</span> LengthUnit <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'@ohos.arkui.node'</span>

<span class="token decorator"><span class="token at operator">@</span><span class="token function">Entry</span></span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Component</span></span>
struct Index <span class="token punctuation">{<!-- --></span>
  fontStyleAttr<span class="token operator">:</span> TextStyle <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">TextStyle</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span>fontSize<span class="token operator">:</span>LengthMetrics<span class="token punctuation">.</span><span class="token function">vp</span><span class="token punctuation">(</span><span class="token number">20</span><span class="token punctuation">)</span><span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  mutableStyledString<span class="token operator">:</span> MutableStyledString <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">MutableStyledString</span><span class="token punctuation">(</span><span class="token string">"hello"</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token punctuation">{<!-- --></span>
    start<span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
    length<span class="token operator">:</span> <span class="token number">5</span><span class="token punctuation">,</span>
    styledKey<span class="token operator">:</span> StyledStringKey<span class="token punctuation">.</span><span class="token constant">FONT</span><span class="token punctuation">,</span>
    styledValue<span class="token operator">:</span> <span class="token keyword">this</span><span class="token punctuation">.</span>fontStyleAttr
  <span class="token punctuation">}</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  controller<span class="token operator">:</span> TextController <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">TextController</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

  <span class="token keyword">async</span> <span class="token function">onPageShow</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token keyword">this</span><span class="token punctuation">.</span>controller<span class="token punctuation">.</span><span class="token function">setStyledString</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>mutableStyledString<span class="token punctuation">)</span>
  <span class="token punctuation">}</span>

  <span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token function">Column</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
      <span class="token comment">//显示属性字符串</span>
      <span class="token function">Text</span><span class="token punctuation">(</span><span class="token keyword">undefined</span><span class="token punctuation">,</span> <span class="token punctuation">{<!-- --></span> controller<span class="token operator">:</span> <span class="token keyword">this</span><span class="token punctuation">.</span>controller <span class="token punctuation">}</span><span class="token punctuation">)</span>
    <span class="token punctuation">}</span><span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.953587;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:12,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ A、A</p> 
<p>​ <code style="user-select: auto;">B、B</code></p> 
<p>​ <code style="user-select: auto;">C、C</code></p> 
<p>​ <code style="user-select: auto;">D、D</code></p> 
<hr> 
<p>14、依次点击A、B、C、D四个按钮，其中不会触发UI刷新的是:</p> 
<pre data-index="13" class="prettyprint set-code-show" style="user-select: auto;"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset; user-select: auto;"><span class="token decorator"><span class="token at operator">@</span><span class="token function">Entry</span></span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Component</span></span>
struct Index <span class="token punctuation">{<!-- --></span>
  <span class="token decorator"><span class="token at operator">@</span><span class="token function">State</span></span> count<span class="token operator">:</span> <span class="token builtin">number</span> <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span>
  <span class="token decorator"><span class="token at operator">@</span><span class="token function">State</span></span> <span class="token decorator"><span class="token at operator">@</span><span class="token function">Watch</span></span><span class="token punctuation">(</span><span class="token string">'onValueChange'</span><span class="token punctuation">)</span> value<span class="token operator">:</span> <span class="token builtin">number</span> <span class="token operator">=</span> <span class="token number">50</span><span class="token punctuation">;</span>

  <span class="token function">onValueChange</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token keyword">this</span><span class="token punctuation">.</span>count <span class="token operator">=</span> <span class="token keyword">this</span><span class="token punctuation">.</span>value<span class="token punctuation">;</span>
  <span class="token punctuation">}</span>
  <span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token function">Column</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
      <span class="token function">Text</span><span class="token punctuation">(</span><span class="token template-string"><span class="token template-punctuation string">`</span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${<!-- --></span><span class="token keyword">this</span><span class="token punctuation">.</span>count<span class="token interpolation-punctuation punctuation">}</span></span><span class="token template-punctuation string">`</span></span><span class="token punctuation">)</span>
      <span class="token function">Button</span><span class="token punctuation">(</span><span class="token string">"A"</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">onClick</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
          <span class="token keyword">this</span><span class="token punctuation">.</span>count <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span><span class="token punctuation">)</span>
      <span class="token function">Button</span><span class="token punctuation">(</span><span class="token string">"B"</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">onClick</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
          <span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">let</span> i <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span> i <span class="token operator">&lt;</span> <span class="token number">1000</span><span class="token punctuation">;</span> i<span class="token operator">++</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
            <span class="token keyword">this</span><span class="token punctuation">.</span>count <span class="token operator">=</span> i<span class="token punctuation">;</span>
          <span class="token punctuation">}</span>
          <span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">let</span> i <span class="token operator">=</span> <span class="token number">1000</span><span class="token punctuation">;</span> i <span class="token operator">&gt;</span> <span class="token number">0</span><span class="token punctuation">;</span> i<span class="token operator">--</span><span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>
            <span class="token keyword">this</span><span class="token punctuation">.</span>count <span class="token operator">=</span> i<span class="token punctuation">;</span>
          <span class="token punctuation">}</span>
          <span class="token keyword">this</span><span class="token punctuation">.</span>count<span class="token operator">--</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span><span class="token punctuation">)</span>
      <span class="token function">Button</span><span class="token punctuation">(</span><span class="token string">"C"</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">onClick</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
          <span class="token keyword">this</span><span class="token punctuation">.</span>value <span class="token operator">=</span> <span class="token number">100</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span><span class="token punctuation">)</span>
      <span class="token function">Button</span><span class="token punctuation">(</span><span class="token string">"D"</span> <span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">onClick</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
          <span class="token function">setInterval</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{<!-- --></span>
            <span class="token keyword">this</span><span class="token punctuation">.</span>count<span class="token operator">++</span><span class="token punctuation">;</span>
          <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token number">1000</span><span class="token punctuation">)</span>
        <span class="token punctuation">}</span><span class="token punctuation">)</span>
    <span class="token punctuation">}</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.953587;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:13,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ <code style="user-select: auto;">A、A</code></p> 
<p>​ <code style="user-select: auto;">B、B</code></p> 
<p>​ C、C</p> 
<p>​ D、D</p> 
<hr> 
<p>15、如何实现类似下图布局</p> 
<p><img src="https://i-blog.csdnimg.cn/direct/5af7f272fc0048f987a43580b93c2707.png#pic_center" alt="在这里插入图片描述"></p> 
<pre data-index="14" class="prettyprint set-code-show" style="user-select: auto;"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset; user-select: auto;"><span class="token comment">//	A</span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Entry</span></span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Component</span></span>
struct Demo <span class="token punctuation">{<!-- --></span>
  <span class="token comment">//忽略其他辅助代码</span>
  dataSource<span class="token operator">:</span> ItemDataSource <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">ItemDataSource</span><span class="token punctuation">(</span><span class="token number">100</span><span class="token punctuation">)</span>
  itemHeightArray<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token punctuation">]</span>
  colors<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token number">0xFFC0CB</span><span class="token punctuation">,</span> <span class="token number">0xDA70D6</span><span class="token punctuation">,</span> <span class="token number">0x6B8E23</span><span class="token punctuation">,</span> <span class="token number">0x6A5ACD</span><span class="token punctuation">,</span> <span class="token number">0x00FFFF</span><span class="token punctuation">,</span> <span class="token number">0x00FF7F</span><span class="token punctuation">]</span>
  scroller<span class="token operator">:</span> Scroller <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Scroller</span><span class="token punctuation">(</span><span class="token punctuation">)</span>

  <span class="token function">aboutToAppear</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">getItemSizeArray</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
  <span class="token punctuation">}</span>

  <span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token function">Scroll</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
      <span class="token function">Column</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token function">Grid</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
          <span class="token function">GridItem</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
            <span class="token function">Text</span><span class="token punctuation">(</span><span class="token string">'GoodsTypeList'</span><span class="token punctuation">)</span>
          <span class="token punctuation">}</span>
          <span class="token punctuation">.</span><span class="token function">backgroundColor</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>colors<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">)</span>

          <span class="token function">GridItem</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
            <span class="token function">Text</span><span class="token punctuation">(</span><span class="token string">'AppletService'</span><span class="token punctuation">)</span>
          <span class="token punctuation">}</span>
          <span class="token punctuation">.</span><span class="token function">backgroundColor</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>colors<span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span><span class="token punctuation">)</span>

          <span class="token function">GridItem</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
            <span class="token function">Text</span><span class="token punctuation">(</span><span class="token string">'ReloadData'</span><span class="token punctuation">)</span>
          <span class="token punctuation">}</span>
          <span class="token punctuation">.</span><span class="token function">backgroundColor</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>colors<span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
        <span class="token punctuation">}</span>
        <span class="token punctuation">.</span><span class="token function">rowsGap</span><span class="token punctuation">(</span><span class="token number">10</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">columnsTemplate</span><span class="token punctuation">(</span><span class="token string">'1fr'</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">rowsTemplate</span><span class="token punctuation">(</span><span class="token string">'1fr 1fr 1fr'</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token number">100</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">margin</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span>
          top<span class="token operator">:</span> <span class="token number">10</span><span class="token punctuation">,</span>
          left<span class="token operator">:</span> <span class="token number">5</span><span class="token punctuation">,</span>
          bottom<span class="token operator">:</span> <span class="token number">10</span><span class="token punctuation">,</span>
          right<span class="token operator">:</span> <span class="token number">5</span>
        <span class="token punctuation">}</span><span class="token punctuation">)</span>

        <span class="token function">Grid</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
          <span class="token function">LazyForEach</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>datasource<span class="token punctuation">,</span> <span class="token punctuation">(</span>item<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
            <span class="token function">GridItem</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
              <span class="token comment">//使用可复用自定义组件</span>
              <span class="token function">ReusableItem</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> item<span class="token operator">:</span> item <span class="token punctuation">}</span><span class="token punctuation">)</span>
            <span class="token punctuation">}</span>
            <span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span>
            <span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>itemHeightArray<span class="token punctuation">[</span>item <span class="token operator">%</span> <span class="token number">100</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
            <span class="token punctuation">.</span><span class="token function">backgroundColor</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>colors<span class="token punctuation">[</span>item <span class="token operator">%</span> <span class="token number">5</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
          <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token punctuation">(</span>item<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token string">''</span> <span class="token operator">+</span> item <span class="token operator">+</span> <span class="token keyword">this</span><span class="token punctuation">.</span>itemHeightArray<span class="token punctuation">[</span>item <span class="token operator">%</span> <span class="token number">100</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
        <span class="token punctuation">}</span>
        <span class="token punctuation">.</span><span class="token function">columnsTemplate</span><span class="token punctuation">(</span><span class="token string">"1fr 1fr"</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">columnsGap</span><span class="token punctuation">(</span><span class="token number">10</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">rowsGap</span><span class="token punctuation">(</span><span class="token number">5</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">nestedScroll</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span>
          scrollForward<span class="token operator">:</span> NestedScrollMode<span class="token punctuation">.</span><span class="token constant">PARENT_FIRST</span><span class="token punctuation">,</span>
          scrollBackward<span class="token operator">:</span> NestedScrollMode<span class="token punctuation">.</span><span class="token constant">SELF_FIRST</span>
        <span class="token punctuation">}</span><span class="token punctuation">)</span>
      <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>
    <span class="token punctuation">.</span><span class="token function">scrollBar</span><span class="token punctuation">(</span>BarState<span class="token punctuation">.</span>Off<span class="token punctuation">)</span>
    <span class="token punctuation">.</span><span class="token function">edgeEffect</span><span class="token punctuation">(</span>EdgeEffect<span class="token punctuation">.</span>None<span class="token punctuation">)</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.953587;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li><li style="color: rgb(153, 153, 153);">40</li><li style="color: rgb(153, 153, 153);">41</li><li style="color: rgb(153, 153, 153);">42</li><li style="color: rgb(153, 153, 153);">43</li><li style="color: rgb(153, 153, 153);">44</li><li style="color: rgb(153, 153, 153);">45</li><li style="color: rgb(153, 153, 153);">46</li><li style="color: rgb(153, 153, 153);">47</li><li style="color: rgb(153, 153, 153);">48</li><li style="color: rgb(153, 153, 153);">49</li><li style="color: rgb(153, 153, 153);">50</li><li style="color: rgb(153, 153, 153);">51</li><li style="color: rgb(153, 153, 153);">52</li><li style="color: rgb(153, 153, 153);">53</li><li style="color: rgb(153, 153, 153);">54</li><li style="color: rgb(153, 153, 153);">55</li><li style="color: rgb(153, 153, 153);">56</li><li style="color: rgb(153, 153, 153);">57</li><li style="color: rgb(153, 153, 153);">58</li><li style="color: rgb(153, 153, 153);">59</li><li style="color: rgb(153, 153, 153);">60</li><li style="color: rgb(153, 153, 153);">61</li><li style="color: rgb(153, 153, 153);">62</li><li style="color: rgb(153, 153, 153);">63</li><li style="color: rgb(153, 153, 153);">64</li><li style="color: rgb(153, 153, 153);">65</li><li style="color: rgb(153, 153, 153);">66</li><li style="color: rgb(153, 153, 153);">67</li><li style="color: rgb(153, 153, 153);">68</li><li style="color: rgb(153, 153, 153);">69</li><li style="color: rgb(153, 153, 153);">70</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:14,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="15" class="prettyprint set-code-show" style="user-select: auto;"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset; user-select: auto;"><span class="token comment">//	B</span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Entry</span></span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Component</span></span>
struct Demo <span class="token punctuation">{<!-- --></span>
  <span class="token comment">//忽略其他辅助代码</span>
  dataSource<span class="token operator">:</span> ItemDataSource <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">ItemDataSource</span><span class="token punctuation">(</span><span class="token number">100</span><span class="token punctuation">)</span>
  itemHeightArray<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token punctuation">]</span>
  colors<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token number">0xFFC0CB</span><span class="token punctuation">,</span> <span class="token number">0xDA70D6</span><span class="token punctuation">,</span> <span class="token number">0x6B8E23</span><span class="token punctuation">,</span> <span class="token number">0x6A5ACD</span><span class="token punctuation">,</span> <span class="token number">0x00FFFF</span><span class="token punctuation">,</span> <span class="token number">0x00FF7F</span><span class="token punctuation">]</span>
  scroller<span class="token operator">:</span> Scroller <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Scroller</span><span class="token punctuation">(</span><span class="token punctuation">)</span>

  <span class="token decorator"><span class="token at operator">@</span><span class="token function">State</span></span> sections<span class="token operator">:</span> WaterFlowSections <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">WaterFlowSections</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
  sectionMargin<span class="token operator">:</span> Margin <span class="token operator">=</span> <span class="token punctuation">{<!-- --></span> top<span class="token operator">:</span> <span class="token number">10</span><span class="token punctuation">,</span> left<span class="token operator">:</span> <span class="token number">5</span><span class="token punctuation">,</span> bottom<span class="token operator">:</span> <span class="token number">10</span><span class="token punctuation">,</span> right<span class="token operator">:</span> <span class="token number">5</span> <span class="token punctuation">}</span>
  oneColumnSection<span class="token operator">:</span> SectionOptions <span class="token operator">=</span> <span class="token punctuation">{<!-- --></span>
    itemsCount<span class="token operator">:</span> <span class="token number">3</span><span class="token punctuation">,</span>
    crossCount<span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
    rowsGap<span class="token operator">:</span> <span class="token number">10</span><span class="token punctuation">,</span>
    margin<span class="token operator">:</span> <span class="token keyword">this</span><span class="token punctuation">.</span>sectionMargin<span class="token punctuation">,</span>
    <span class="token function-variable function">onGetItemMainSizeByIndex</span><span class="token operator">:</span> <span class="token punctuation">(</span>index<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
      <span class="token keyword">return</span> <span class="token keyword">this</span><span class="token punctuation">.</span>itemHeightArray<span class="token punctuation">[</span>index <span class="token operator">%</span> <span class="token number">100</span><span class="token punctuation">]</span>
    <span class="token punctuation">}</span>
  <span class="token punctuation">}</span>

  lastSection<span class="token operator">:</span> SectionOptions <span class="token operator">=</span> <span class="token punctuation">{<!-- --></span>
    itemsCount<span class="token operator">:</span> <span class="token number">97</span><span class="token punctuation">,</span>
    crossCount<span class="token operator">:</span> <span class="token number">2</span><span class="token punctuation">,</span>
    margin<span class="token operator">:</span> <span class="token keyword">this</span><span class="token punctuation">.</span>sectionMargin<span class="token punctuation">,</span>
    <span class="token function-variable function">onGetItemMainSizeByIndex</span><span class="token operator">:</span> <span class="token punctuation">(</span>index<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
      <span class="token keyword">return</span> <span class="token keyword">this</span><span class="token punctuation">.</span>itemHeightArray<span class="token punctuation">[</span>index <span class="token operator">%</span> <span class="token number">100</span><span class="token punctuation">]</span>
    <span class="token punctuation">}</span>
  <span class="token punctuation">}</span>

  <span class="token function">aboutToAppear</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">setItemSizeArray</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
    <span class="token comment">//	初始化瀑布流分组信息</span>
    <span class="token keyword">let</span> sectionOptions<span class="token operator">:</span> SectionOptions<span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token punctuation">]</span>
    sectionOptions<span class="token punctuation">.</span><span class="token function">push</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>oneColumnSection<span class="token punctuation">)</span>
    sectionOptions<span class="token punctuation">.</span><span class="token function">push</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>lastSection<span class="token punctuation">)</span>
    <span class="token keyword">this</span><span class="token punctuation">.</span>sections<span class="token punctuation">.</span><span class="token function">splice</span><span class="token punctuation">(</span><span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> sectionOptions<span class="token punctuation">)</span>
  <span class="token punctuation">}</span>

  <span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token function">WaterFlow</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> scroller<span class="token operator">:</span> <span class="token keyword">this</span><span class="token punctuation">.</span>scroller<span class="token punctuation">,</span> sections<span class="token operator">:</span> <span class="token keyword">this</span><span class="token punctuation">.</span>sections <span class="token punctuation">}</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
      <span class="token function">LazyForEach</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>dataSource<span class="token punctuation">,</span> <span class="token punctuation">(</span>item<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
        <span class="token function">FlowItem</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
          <span class="token function">ReusableFlowItem</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> item<span class="token operator">:</span> item <span class="token punctuation">}</span><span class="token punctuation">)</span>
        <span class="token punctuation">}</span>
        <span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">backgroundColor</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>colors<span class="token punctuation">[</span>item <span class="token operator">%</span> <span class="token number">5</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
      <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token punctuation">(</span>item<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> item<span class="token punctuation">)</span>
    <span class="token punctuation">}</span>
    <span class="token punctuation">.</span><span class="token function">columnsGap</span><span class="token punctuation">(</span><span class="token number">10</span><span class="token punctuation">)</span>
    <span class="token punctuation">.</span><span class="token function">rowsGap</span><span class="token punctuation">(</span><span class="token number">5</span><span class="token punctuation">)</span>
    <span class="token punctuation">.</span><span class="token function">backgroundColor</span><span class="token punctuation">(</span><span class="token number">0xFAEEE0</span><span class="token punctuation">)</span>
    <span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span>
    <span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.953587;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li><li style="color: rgb(153, 153, 153);">40</li><li style="color: rgb(153, 153, 153);">41</li><li style="color: rgb(153, 153, 153);">42</li><li style="color: rgb(153, 153, 153);">43</li><li style="color: rgb(153, 153, 153);">44</li><li style="color: rgb(153, 153, 153);">45</li><li style="color: rgb(153, 153, 153);">46</li><li style="color: rgb(153, 153, 153);">47</li><li style="color: rgb(153, 153, 153);">48</li><li style="color: rgb(153, 153, 153);">49</li><li style="color: rgb(153, 153, 153);">50</li><li style="color: rgb(153, 153, 153);">51</li><li style="color: rgb(153, 153, 153);">52</li><li style="color: rgb(153, 153, 153);">53</li><li style="color: rgb(153, 153, 153);">54</li><li style="color: rgb(153, 153, 153);">55</li><li style="color: rgb(153, 153, 153);">56</li><li style="color: rgb(153, 153, 153);">57</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:15,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="16" class="prettyprint set-code-show" style="user-select: auto;"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset; user-select: auto;"><span class="token comment">//	C</span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Entry</span></span>
<span class="token decorator"><span class="token at operator">@</span><span class="token function">Component</span></span>
struct Demo <span class="token punctuation">{<!-- --></span>
  <span class="token comment">//忽略其他辅助代码</span>
  dataSource<span class="token operator">:</span> ItemDataSource <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">ItemDataSource</span><span class="token punctuation">(</span><span class="token number">100</span><span class="token punctuation">)</span>
  itemHeightArray<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token punctuation">]</span>
  colors<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token number">0xFFC0CB</span><span class="token punctuation">,</span> <span class="token number">0xDA70D6</span><span class="token punctuation">,</span> <span class="token number">0x6B8E23</span><span class="token punctuation">,</span> <span class="token number">0x6A5ACD</span><span class="token punctuation">,</span> <span class="token number">0x00FFFF</span><span class="token punctuation">,</span> <span class="token number">0x00FF7F</span><span class="token punctuation">]</span>
  scroller<span class="token operator">:</span> Scroller <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Scroller</span><span class="token punctuation">(</span><span class="token punctuation">)</span>

  <span class="token function">aboutToAppear</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">getItemSizeArray</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
  <span class="token punctuation">}</span>

  <span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token function">Column</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
      <span class="token function">List</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> scroller<span class="token operator">:</span> <span class="token keyword">this</span><span class="token punctuation">.</span>scroller<span class="token punctuation">,</span> space<span class="token operator">:</span> <span class="token number">10</span> <span class="token punctuation">}</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token function">ListItem</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>
          <span class="token function">Grid</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
            <span class="token function">GridItem</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
              <span class="token function">Text</span><span class="token punctuation">(</span><span class="token string">'GoodsTypeList'</span><span class="token punctuation">)</span>
            <span class="token punctuation">}</span><span class="token punctuation">.</span><span class="token function">backgroundColor</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>colors<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">)</span>

            <span class="token function">GridItem</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
              <span class="token function">Text</span><span class="token punctuation">(</span><span class="token string">'AppletService'</span><span class="token punctuation">)</span>
            <span class="token punctuation">}</span><span class="token punctuation">.</span><span class="token function">backgroundColor</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>colors<span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span><span class="token punctuation">)</span>

            <span class="token function">GridItem</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
              <span class="token function">Text</span><span class="token punctuation">(</span><span class="token string">'ReloadData'</span><span class="token punctuation">)</span>
            <span class="token punctuation">}</span><span class="token punctuation">.</span><span class="token function">backgroundColor</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>colors<span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
          <span class="token punctuation">}</span>
          <span class="token punctuation">.</span><span class="token function">rowsGap</span><span class="token punctuation">(</span><span class="token number">10</span><span class="token punctuation">)</span>
          <span class="token punctuation">.</span><span class="token function">columnsTemplate</span><span class="token punctuation">(</span><span class="token string">'1fr'</span><span class="token punctuation">)</span>
          <span class="token punctuation">.</span><span class="token function">rowsTemplate</span><span class="token punctuation">(</span><span class="token string">'1fr 1fr 1fr'</span><span class="token punctuation">)</span>
          <span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span>
          <span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token number">100</span><span class="token punctuation">)</span>
        <span class="token punctuation">}</span>

        <span class="token function">ListItem</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
          <span class="token function">WaterFlow</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>
            <span class="token function">LazyForEach</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>datasource<span class="token punctuation">,</span> <span class="token punctuation">(</span>item<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">,</span> index<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
              <span class="token function">FlowItem</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
                <span class="token comment">//使用可复用自定义组件</span>
                <span class="token function">ReusableItem</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> item<span class="token operator">:</span> item <span class="token operator">+</span> index <span class="token punctuation">}</span><span class="token punctuation">)</span>
              <span class="token punctuation">}</span>
              <span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span>
              <span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>itemHeightArray<span class="token punctuation">[</span>item <span class="token operator">%</span> <span class="token number">100</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
              <span class="token punctuation">.</span><span class="token function">backgroundColor</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>colors<span class="token punctuation">[</span>item <span class="token operator">%</span> <span class="token number">5</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
            <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token punctuation">(</span>item<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token string">''</span> <span class="token operator">+</span> item <span class="token operator">+</span> <span class="token keyword">this</span><span class="token punctuation">.</span>itemHeightArray<span class="token punctuation">[</span>item <span class="token operator">%</span> <span class="token number">100</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
          <span class="token punctuation">}</span>
          <span class="token punctuation">.</span><span class="token function">id</span><span class="token punctuation">(</span><span class="token string">'Waterflow'</span><span class="token punctuation">)</span>
          <span class="token punctuation">.</span><span class="token function">columnsTemplate</span><span class="token punctuation">(</span><span class="token string">"1fr 1fr"</span><span class="token punctuation">)</span>
          <span class="token punctuation">.</span><span class="token function">columnsGap</span><span class="token punctuation">(</span><span class="token number">10</span><span class="token punctuation">)</span>
          <span class="token punctuation">.</span><span class="token function">rowsGap</span><span class="token punctuation">(</span><span class="token number">5</span><span class="token punctuation">)</span>
          <span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span>
          <span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span>
          <span class="token punctuation">.</span><span class="token function">nestedScroll</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span>
            scrollForward<span class="token operator">:</span> NestedScrollMode<span class="token punctuation">.</span><span class="token constant">PARENT_FIRST</span><span class="token punctuation">,</span>
            scrollBackward<span class="token operator">:</span> NestedScrollMode<span class="token punctuation">.</span><span class="token constant">SELF_FIRST</span>
          <span class="token punctuation">}</span><span class="token punctuation">)</span>
        <span class="token punctuation">}</span>
      <span class="token punctuation">}</span>
      <span class="token punctuation">.</span><span class="token function">scrollBar</span><span class="token punctuation">(</span>BarState<span class="token punctuation">.</span>Off<span class="token punctuation">)</span>
      <span class="token punctuation">.</span><span class="token function">edgeEffect</span><span class="token punctuation">(</span>EdgeEffect<span class="token punctuation">.</span>None<span class="token punctuation">)</span>
    <span class="token punctuation">}</span>
    <span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span>
    <span class="token punctuation">.</span><span class="token function">padding</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> left<span class="token operator">:</span> <span class="token number">10</span><span class="token punctuation">,</span> right<span class="token operator">:</span> <span class="token number">10</span> <span class="token punctuation">}</span><span class="token punctuation">)</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.953587;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li><li style="color: rgb(153, 153, 153);">40</li><li style="color: rgb(153, 153, 153);">41</li><li style="color: rgb(153, 153, 153);">42</li><li style="color: rgb(153, 153, 153);">43</li><li style="color: rgb(153, 153, 153);">44</li><li style="color: rgb(153, 153, 153);">45</li><li style="color: rgb(153, 153, 153);">46</li><li style="color: rgb(153, 153, 153);">47</li><li style="color: rgb(153, 153, 153);">48</li><li style="color: rgb(153, 153, 153);">49</li><li style="color: rgb(153, 153, 153);">50</li><li style="color: rgb(153, 153, 153);">51</li><li style="color: rgb(153, 153, 153);">52</li><li style="color: rgb(153, 153, 153);">53</li><li style="color: rgb(153, 153, 153);">54</li><li style="color: rgb(153, 153, 153);">55</li><li style="color: rgb(153, 153, 153);">56</li><li style="color: rgb(153, 153, 153);">57</li><li style="color: rgb(153, 153, 153);">58</li><li style="color: rgb(153, 153, 153);">59</li><li style="color: rgb(153, 153, 153);">60</li><li style="color: rgb(153, 153, 153);">61</li><li style="color: rgb(153, 153, 153);">62</li><li style="color: rgb(153, 153, 153);">63</li><li style="color: rgb(153, 153, 153);">64</li><li style="color: rgb(153, 153, 153);">65</li><li style="color: rgb(153, 153, 153);">66</li><li style="color: rgb(153, 153, 153);">67</li><li style="color: rgb(153, 153, 153);">68</li><li style="color: rgb(153, 153, 153);">69</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:16,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ A、A === Grid</p> 
<p>​ <code style="user-select: auto;">B、B</code> === WaterFlow</p> 
<p>​ <code style="user-select: auto;">C、C</code> === List</p> 
<hr> 
<p>16、Code Linter针对ArkTS/TS代码进行最佳实践/编程规范方面的检查，最佳实践/编程规范方面的检查规则可以配置，针对codelinter的配 置项一下哪些说法是正确的</p> 
<p>​ A、rules：可以基于ruleSet配置的规则集，新增额外规则项，但是无法修改ruleSet中规则默认配置</p> 
<p>​ <code style="user-select: auto;">B、files：配置待检查的文件名单，如未指定目录，规则适用于所有文件，例如: [“**/*.ets”,“**/*.js”,“**/*.ts”]。</code></p> 
<p>​ <code style="user-select: auto;">C、ignore：配置无需检查的文件目录，其指定的目录或文件需使用相对路径格式，相对于code-linter.json5所在工程根目录，例如：build/**/*。</code></p> 
<p>​ <code style="user-select: auto;">D、ruleSet：配置检查使用的规则集，规则集支持一次导入多条规则。</code></p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/ide-code-linter-0000001363071681-V5#section1782903483817" rel="nofollow" target="_blank">代码Code Linter检查-代码检查-代码编辑-DevEco Studio | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>17、一个应用通常会包含多种功能，将不同的功能特性按模块来划分和管理是一种良好的设计方式。在开发过程中，我们可以将每个功能模块作为一个独立的Module进行开发，下面关于Module的说法正确的是</p> 
<p>​ <code style="user-select: auto;">A、Library类型的Module，用于实现代码和资源的共享，有两种类型，分别为Static Library和Shared Library两种类型。</code></p> 
<p>​ <code style="user-select: auto;">B、entry类型的Module，是应用的主模块，一个应用只能包含唯一一个entry类型的HAP。</code></p> 
<p>​ <code style="user-select: auto;">C、Ability类型的Module，用于实现应用的功能和特性，有两种类型，分别为entry和feature。</code></p> 
<p>​ <code style="user-select: auto;">D、feature类型的Module，应用的动态特性模块，一个应用中可以包含一个或多个feature类型的模块，也可以不包</code></p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/application-package-overview-V5#module%E7%B1%BB%E5%9E%8B" rel="nofollow" target="_blank">应用程序包概述-应用程序包基础知识-开发基础知识-基础入门 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>18、在大型<span class="words-blog hl-git-1" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.10283&quot;,&quot;extra&quot;:&quot;{\&quot;words\&quot;:\&quot;软件工程\&quot;}&quot;}" data-tit="软件工程" data-pretit="软件工程">软件工程</span>中，一般会伴随着多团队开发，各团队开发自己的业务模块，最后再由集成交付团队集成到一起，下面哪些是大型应用模块化开发最佳实践</p> 
<p>​ <code style="user-select: auto;">A、避免用户首次下载应用耗时过长，及过多占用用户空间，不常用功能做成按需加载。</code></p> 
<p>​ <code style="user-select: auto;">B、若多个模块依赖了不同版本的HAR，使用OHPM的overrides机制配置指定使用哪个版本的HAR，以减少包大小。</code></p> 
<p>​ <code style="user-select: auto;">C、使用路由表进行模块间解耦。</code></p> 
<p>​ <code style="user-select: auto;">D、一次上架多端部署。</code></p> 
<hr> 
<p><strong>19、通过如下openLink的接口启动，如下哪些配置的UIAbility不可能被拉起（不确定，把所有选项列出）</strong></p> 
<pre data-index="17" class="prettyprint set-code-show" style="user-select: auto;"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset; user-select: auto;"><span class="token keyword">import</span> <span class="token punctuation">{<!-- --></span> hilog <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'@kit.PerformanceAnalysisKit'</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token punctuation">{<!-- --></span> UIAbility<span class="token punctuation">,</span> common<span class="token punctuation">,</span> OpenLinkOptions <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'@kit.AbilityKit'</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token punctuation">{<!-- --></span> BusinessError <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'@kit.BasicServicesKit'</span><span class="token punctuation">;</span>

<span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token keyword">class</span> <span class="token class-name">MyAbility</span> <span class="token keyword">extends</span> <span class="token class-name">UIAbility</span> <span class="token punctuation">{<!-- --></span>
  <span class="token function">onForeground</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token keyword">let</span> link<span class="token operator">:</span> <span class="token builtin">string</span> <span class="token operator">=</span> <span class="token string">"https://www.example.com"</span>
    <span class="token keyword">let</span> openLinkOptions<span class="token operator">:</span> OpenLinkOptions <span class="token operator">=</span> <span class="token punctuation">{<!-- --></span>
      applinkingOnly<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
      parameters<span class="token operator">:</span> <span class="token punctuation">{<!-- --></span>demo_key<span class="token operator">:</span> <span class="token string">"demo_value"</span><span class="token punctuation">}</span>
    <span class="token punctuation">}</span><span class="token punctuation">;</span>
    <span class="token keyword">try</span> <span class="token punctuation">{<!-- --></span>
      <span class="token keyword">this</span><span class="token punctuation">.</span>context<span class="token punctuation">.</span><span class="token function">openLink</span><span class="token punctuation">(</span>
        link<span class="token punctuation">,</span>
        openLinkOptions<span class="token punctuation">,</span>
        <span class="token punctuation">(</span>err<span class="token punctuation">,</span> result<span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
          hilog<span class="token punctuation">.</span><span class="token function">error</span><span class="token punctuation">(</span><span class="token constant">DOMAIN</span><span class="token punctuation">,</span> <span class="token constant">TAG</span><span class="token punctuation">,</span> <span class="token string">'openLink callback error.code:'</span> <span class="token operator">+</span> <span class="token constant">JSON</span><span class="token punctuation">.</span><span class="token function">stringify</span><span class="token punctuation">(</span>err<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
      <span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{<!-- --></span>
        hilog<span class="token punctuation">.</span><span class="token function">info</span><span class="token punctuation">(</span><span class="token constant">DOMAIN</span><span class="token punctuation">,</span> <span class="token constant">TAG</span><span class="token punctuation">,</span> <span class="token string">'open link success.'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
      <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">catch</span><span class="token punctuation">(</span><span class="token punctuation">(</span>err<span class="token operator">:</span> BusinessError<span class="token punctuation">)</span><span class="token operator">=&gt;</span><span class="token punctuation">{<!-- --></span>
        hilog<span class="token punctuation">.</span><span class="token function">error</span><span class="token punctuation">(</span><span class="token constant">DOMAIN</span><span class="token punctuation">,</span> <span class="token constant">TAG</span><span class="token punctuation">,</span> <span class="token string">'open link failed, errCode '</span> <span class="token operator">+</span> <span class="token constant">JSON</span><span class="token punctuation">.</span><span class="token function">stringify</span><span class="token punctuation">(</span>err<span class="token punctuation">.</span>code<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
      <span class="token punctuation">}</span><span class="token punctuation">)</span>
    <span class="token punctuation">}</span>
    <span class="token keyword">catch</span> <span class="token punctuation">(</span>e<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
      hilog<span class="token punctuation">.</span><span class="token function">error</span><span class="token punctuation">(</span><span class="token constant">DOMAIN</span><span class="token punctuation">,</span> <span class="token constant">TAG</span><span class="token punctuation">,</span> <span class="token string">'exception occured, errCode '</span> <span class="token operator">+</span> <span class="token constant">JSON</span><span class="token punctuation">.</span><span class="token function">stringify</span><span class="token punctuation">(</span>e<span class="token punctuation">.</span>code<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.953587;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:17,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="18" class="prettyprint set-code-show" style="user-select: auto;"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset; user-select: auto;"><span class="token comment">// A</span>
<span class="token punctuation">{<!-- --></span>
	<span class="token string-property property">"name"</span><span class="token operator">:</span> <span class="token string">"TargetAbility"</span><span class="token punctuation">,</span>
	<span class="token string-property property">"skills"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
		<span class="token punctuation">{<!-- --></span>
            <span class="token string-property property">"actions"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
            	<span class="token string">"ohos.want.action.vieData"</span><span class="token punctuation">,</span>
            <span class="token punctuation">]</span><span class="token punctuation">,</span>
            <span class="token string-property property">"entities"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
                <span class="token string">"entity.system.browsable"</span><span class="token punctuation">,</span>
            <span class="token punctuation">]</span><span class="token punctuation">,</span>
            <span class="token string-property property">"uris"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
                <span class="token punctuation">{<!-- --></span>
                    <span class="token string-property property">"scheme"</span><span class="token operator">:</span> <span class="token string">"http"</span><span class="token punctuation">,</span>
                    <span class="token string-property property">"host"</span><span class="token operator">:</span> <span class="token string">"www.test.com"</span><span class="token punctuation">,</span>
                    <span class="token string-property property">"port"</span><span class="token operator">:</span> <span class="token string">"8080"</span><span class="token punctuation">,</span>
                    <span class="token string-property property">"path"</span><span class="token operator">:</span> <span class="token string">"path"</span>
                <span class="token punctuation">}</span>			
            <span class="token punctuation">]</span>
    	<span class="token punctuation">}</span>
	<span class="token punctuation">]</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.953587;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:18,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="19" class="prettyprint set-code-show" style="user-select: auto;"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset; user-select: auto;"><span class="token comment">//	B</span>
<span class="token punctuation">{<!-- --></span>
	<span class="token string-property property">"name"</span><span class="token operator">:</span> <span class="token string">"TargetAbility"</span><span class="token punctuation">,</span>
	<span class="token string-property property">"skills"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
		<span class="token punctuation">{<!-- --></span>
            <span class="token string-property property">"actions"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
            	<span class="token string">"ohos.want.action.viewData"</span><span class="token punctuation">,</span>
            <span class="token punctuation">]</span><span class="token punctuation">,</span>
            <span class="token string-property property">"entities"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
                <span class="token string">"entity.system.browsable"</span><span class="token punctuation">,</span>
            <span class="token punctuation">]</span><span class="token punctuation">,</span>
            <span class="token string-property property">"uris"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
                <span class="token punctuation">{<!-- --></span>
                    <span class="token string-property property">"scheme"</span><span class="token operator">:</span> <span class="token string">"https"</span><span class="token punctuation">,</span>
                    <span class="token string-property property">"host"</span><span class="token operator">:</span> <span class="token string">"www.test.com"</span><span class="token punctuation">,</span>
                    <span class="token string-property property">"port"</span><span class="token operator">:</span> <span class="token string">"8080"</span><span class="token punctuation">,</span>
                    <span class="token string-property property">"path"</span><span class="token operator">:</span> <span class="token string">"path"</span><span class="token punctuation">,</span>
                    <span class="token string-property property">"autoVerify"</span><span class="token operator">:</span> ture
                <span class="token punctuation">}</span>			
            <span class="token punctuation">]</span>
    	<span class="token punctuation">}</span>
	<span class="token punctuation">]</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.953587;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:19,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="20" class="prettyprint set-code-show" style="user-select: auto;"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset; user-select: auto;"><span class="token comment">//	C</span>
<span class="token punctuation">{<!-- --></span>
	<span class="token string-property property">"name"</span><span class="token operator">:</span> <span class="token string">"TargetAbility"</span><span class="token punctuation">,</span>
	<span class="token string-property property">"skills"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
		<span class="token punctuation">{<!-- --></span>
            <span class="token string-property property">"actions"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
            	<span class="token string">"ohos.want.action.sendData"</span><span class="token punctuation">,</span>
            <span class="token punctuation">]</span><span class="token punctuation">,</span>
            <span class="token string-property property">"entities"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
                <span class="token string">"entity.system.browsable"</span><span class="token punctuation">,</span>
            <span class="token punctuation">]</span><span class="token punctuation">,</span>
            <span class="token string-property property">"uris"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
                <span class="token punctuation">{<!-- --></span>
                    <span class="token string-property property">"scheme"</span><span class="token operator">:</span> <span class="token string">"http"</span><span class="token punctuation">,</span>
                    <span class="token string-property property">"host"</span><span class="token operator">:</span> <span class="token string">"www.test.com"</span><span class="token punctuation">,</span>
                    <span class="token string-property property">"port"</span><span class="token operator">:</span> <span class="token string">"8080"</span><span class="token punctuation">,</span>
                    <span class="token string-property property">"path"</span><span class="token operator">:</span> <span class="token string">"path"</span><span class="token punctuation">,</span>
                    <span class="token string-property property">"autoVerify"</span><span class="token operator">:</span> ture
                <span class="token punctuation">}</span>			
            <span class="token punctuation">]</span>
    	<span class="token punctuation">}</span>
	<span class="token punctuation">]</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.953587;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:20,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="21" class="prettyprint set-code-show" style="user-select: auto;"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset; user-select: auto;"><span class="token comment">//	D</span>
<span class="token punctuation">{<!-- --></span>
	<span class="token string-property property">"name"</span><span class="token operator">:</span> <span class="token string">"TargetAbility"</span><span class="token punctuation">,</span>
	<span class="token string-property property">"skills"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
		<span class="token punctuation">{<!-- --></span>
            <span class="token string-property property">"actions"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
            	<span class="token string">"ohos.want.action.SendData"</span><span class="token punctuation">,</span>
            <span class="token punctuation">]</span><span class="token punctuation">,</span>
            <span class="token string-property property">"entities"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
                <span class="token string">"entity.system.browsable"</span><span class="token punctuation">,</span>
            <span class="token punctuation">]</span><span class="token punctuation">,</span>
            <span class="token string-property property">"uris"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
                <span class="token punctuation">{<!-- --></span>
                    <span class="token string-property property">"scheme"</span><span class="token operator">:</span> <span class="token string">"https"</span><span class="token punctuation">,</span>
                    <span class="token string-property property">"host"</span><span class="token operator">:</span> <span class="token string">"www.test.com"</span><span class="token punctuation">,</span>
                    <span class="token string-property property">"port"</span><span class="token operator">:</span> <span class="token string">"8080"</span><span class="token punctuation">,</span>
                    <span class="token string-property property">"path"</span><span class="token operator">:</span> <span class="token string">"path"</span><span class="token punctuation">,</span>
                    <span class="token string-property property">"autoVerify"</span><span class="token operator">:</span> ture
                <span class="token punctuation">}</span>			
            <span class="token punctuation">]</span>
    	<span class="token punctuation">}</span>
	<span class="token punctuation">]</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.953587;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:21,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ <code style="user-select: auto;">A、A</code></p> 
<p>​ <strong>B、B</strong></p> 
<p>​ <code style="user-select: auto;">C、C</code></p> 
<p>​ <code style="user-select: auto;">D、D</code></p> 
<hr> 
<p>20、某个应用的启动框架配置文件详细信息如下，以下说法正确的是:</p> 
<pre data-index="22" class="prettyprint set-code-show" style="user-select: auto;"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset; user-select: auto;"><span class="token punctuation">{<!-- --></span>
    
    <span class="token string-property property">"startupTasks"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
        
        <span class="token punctuation">{<!-- --></span>

            <span class="token string-property property">"name"</span><span class="token operator">:</span> <span class="token string">"StartupTask_001"</span><span class="token punctuation">,</span>

            <span class="token string-property property">"srcEntry"</span><span class="token operator">:</span> <span class="token string">"./ets/startup/StartupTask_001.ets"</span><span class="token punctuation">,</span>

            <span class="token string-property property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">[</span>

                <span class="token string">"StartupTask_002"</span><span class="token punctuation">,</span>

                <span class="token string">"StartupTask_003"</span>

            <span class="token punctuation">]</span><span class="token punctuation">,</span>

            <span class="token string-property property">"runOnThread"</span><span class="token operator">:</span> <span class="token string">"taskpool"</span><span class="token punctuation">,</span>

            <span class="token string-property property">"waitOnMainThread"</span><span class="token operator">:</span> <span class="token boolean">false</span>

        <span class="token punctuation">}</span><span class="token punctuation">,</span>
    
        <span class="token punctuation">{<!-- --></span>

            <span class="token string-property property">"name"</span><span class="token operator">:</span> <span class="token string">"StartupTask_002"</span><span class="token punctuation">,</span>

            <span class="token string-property property">"srcEntry"</span><span class="token operator">:</span> <span class="token string">"./ets/startup/StartupTask_002.ets"</span><span class="token punctuation">,</span>

            <span class="token string-property property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">[</span>

                <span class="token string">"StartupTask_004"</span>

            <span class="token punctuation">]</span><span class="token punctuation">,</span>

            <span class="token string-property property">"runOnThread"</span><span class="token operator">:</span> <span class="token string">"taskpool"</span><span class="token punctuation">,</span>

            <span class="token string-property property">"waitOnMainThread"</span><span class="token operator">:</span> <span class="token boolean">false</span>

        <span class="token punctuation">}</span><span class="token punctuation">,</span>

        <span class="token punctuation">{<!-- --></span>

            <span class="token string-property property">"name"</span><span class="token operator">:</span> <span class="token string">"StartupTask_003"</span><span class="token punctuation">,</span>

            <span class="token string-property property">"srcEntry"</span><span class="token operator">:</span> <span class="token string">"./ets/startup/StartupTask_003.ets"</span><span class="token punctuation">,</span>

            <span class="token string-property property">"runOnThread"</span><span class="token operator">:</span> <span class="token string">"taskpool"</span><span class="token punctuation">,</span>

            <span class="token string-property property">"waitOnMainThread"</span><span class="token operator">:</span> <span class="token boolean">false</span>

        <span class="token punctuation">}</span><span class="token punctuation">,</span>
 
        <span class="token punctuation">{<!-- --></span>

            <span class="token string-property property">"name"</span><span class="token operator">:</span> <span class="token string">"StartupTask_004"</span><span class="token punctuation">,</span>

            <span class="token string-property property">"srcEntry"</span><span class="token operator">:</span> <span class="token string">"./ets/startup/StartupTask_004.ets"</span><span class="token punctuation">,</span>

            <span class="token string-property property">"runOnThread"</span><span class="token operator">:</span> <span class="token string">"taskpool"</span><span class="token punctuation">,</span>

            <span class="token string-property property">"waitOnMainThread"</span><span class="token operator">:</span> <span class="token boolean">false</span>

        <span class="token punctuation">}</span><span class="token punctuation">,</span>
  
        <span class="token punctuation">{<!-- --></span>

            <span class="token string-property property">"name"</span><span class="token operator">:</span> <span class="token string">"StartupTask_005"</span><span class="token punctuation">,</span>

            <span class="token string-property property">"srcEntry"</span><span class="token operator">:</span> <span class="token string">"./ets/startup/StartupTask_005.ets"</span><span class="token punctuation">,</span>

            <span class="token string-property property">"runOnThread"</span><span class="token operator">:</span> <span class="token string">"mainThread"</span><span class="token punctuation">,</span>

            <span class="token string-property property">"waitOnMainThread"</span><span class="token operator">:</span> <span class="token boolean">true</span>

        <span class="token punctuation">}</span><span class="token punctuation">,</span>
 
        <span class="token punctuation">{<!-- --></span>

            <span class="token string-property property">"name"</span><span class="token operator">:</span> <span class="token string">"StartupTask_006"</span><span class="token punctuation">,</span>

            <span class="token string-property property">"srcEntry"</span><span class="token operator">:</span> <span class="token string">"./ets/startup/StartupTask_006.ets"</span><span class="token punctuation">,</span>

            <span class="token string-property property">"runOnThread"</span><span class="token operator">:</span> <span class="token string">"mainThread"</span><span class="token punctuation">,</span>

            <span class="token string-property property">"waitOnMainThread"</span><span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>

            ”excludeFromAutoStart"<span class="token operator">:</span> <span class="token boolean">true</span>

        <span class="token punctuation">}</span>
	<span class="token punctuation">]</span><span class="token punctuation">,</span>
        
    <span class="token string-property property">"configEntry"</span><span class="token operator">:</span> <span class="token string">"./ets/startup/StartupConfig.ets"</span>
    
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.953587;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li><li style="color: rgb(153, 153, 153);">40</li><li style="color: rgb(153, 153, 153);">41</li><li style="color: rgb(153, 153, 153);">42</li><li style="color: rgb(153, 153, 153);">43</li><li style="color: rgb(153, 153, 153);">44</li><li style="color: rgb(153, 153, 153);">45</li><li style="color: rgb(153, 153, 153);">46</li><li style="color: rgb(153, 153, 153);">47</li><li style="color: rgb(153, 153, 153);">48</li><li style="color: rgb(153, 153, 153);">49</li><li style="color: rgb(153, 153, 153);">50</li><li style="color: rgb(153, 153, 153);">51</li><li style="color: rgb(153, 153, 153);">52</li><li style="color: rgb(153, 153, 153);">53</li><li style="color: rgb(153, 153, 153);">54</li><li style="color: rgb(153, 153, 153);">55</li><li style="color: rgb(153, 153, 153);">56</li><li style="color: rgb(153, 153, 153);">57</li><li style="color: rgb(153, 153, 153);">58</li><li style="color: rgb(153, 153, 153);">59</li><li style="color: rgb(153, 153, 153);">60</li><li style="color: rgb(153, 153, 153);">61</li><li style="color: rgb(153, 153, 153);">62</li><li style="color: rgb(153, 153, 153);">63</li><li style="color: rgb(153, 153, 153);">64</li><li style="color: rgb(153, 153, 153);">65</li><li style="color: rgb(153, 153, 153);">66</li><li style="color: rgb(153, 153, 153);">67</li><li style="color: rgb(153, 153, 153);">68</li><li style="color: rgb(153, 153, 153);">69</li><li style="color: rgb(153, 153, 153);">70</li><li style="color: rgb(153, 153, 153);">71</li><li style="color: rgb(153, 153, 153);">72</li><li style="color: rgb(153, 153, 153);">73</li><li style="color: rgb(153, 153, 153);">74</li><li style="color: rgb(153, 153, 153);">75</li><li style="color: rgb(153, 153, 153);">76</li><li style="color: rgb(153, 153, 153);">77</li><li style="color: rgb(153, 153, 153);">78</li><li style="color: rgb(153, 153, 153);">79</li><li style="color: rgb(153, 153, 153);">80</li><li style="color: rgb(153, 153, 153);">81</li><li style="color: rgb(153, 153, 153);">82</li><li style="color: rgb(153, 153, 153);">83</li><li style="color: rgb(153, 153, 153);">84</li><li style="color: rgb(153, 153, 153);">85</li><li style="color: rgb(153, 153, 153);">86</li><li style="color: rgb(153, 153, 153);">87</li><li style="color: rgb(153, 153, 153);">88</li><li style="color: rgb(153, 153, 153);">89</li><li style="color: rgb(153, 153, 153);">90</li><li style="color: rgb(153, 153, 153);">91</li><li style="color: rgb(153, 153, 153);">92</li><li style="color: rgb(153, 153, 153);">93</li><li style="color: rgb(153, 153, 153);">94</li><li style="color: rgb(153, 153, 153);">95</li><li style="color: rgb(153, 153, 153);">96</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:22,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ <code style="user-select: auto;">A、StartupTask_005会在主线程执行</code></p> 
<p>​ <code style="user-select: auto;">B、StartupTask_006会在AbilityStage的onCreate前初始化完成</code></p> 
<p>​ <code style="user-select: auto;">C、StartupTask_001会在StartupTask_004之后执行；</code></p> 
<p>​ D、StartupTask_003会在StartupTask_004之后执行</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/app-startup-V5#%E7%BC%96%E5%86%99%E5%90%AF%E5%8A%A8%E6%A1%86%E6%9E%B6%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6" rel="nofollow" target="_blank">应用启动框架AppStartup-Stage模型应用组件-Stage模型开发指导-Ability Kit（程序框架服务）-应用框架 | 华为开发者联盟 (huawei.com)</a></p> 
<hr>
                